const a = async function (
  e,
  { $grid },
  d,
  { dc: { open, close, http, message }, i18n: { t }, xe: { get, findTree } }
) {
  const ret = await new Promise(function (resolve) {
    const uuid = "b1b106117d5b4d1f8bd4b771cb624b4b";
    const layout = { id: uuid };
    const modal = {
      title: "选择学工工号",
      width: "35vw",
      minHeight: 200,
      defaultFullscreen: false,
      destroyOnClose: true,
      centered: true,
      open: true,
    };
    const inner = {
      onOk: async function (e, { origin, memory }) {
        const select = get(
          origin,
          "7107b7c22dd241e6954fdb44351012fb.workNo",
          []
        );
        const selectOptions = get(memory, "listNameNoList", []);
        const list = [];
        select.forEach((label) => {
          const { value, workNo } = findTree(
            selectOptions,
            (i) => i.value === label
          ).item;
          if (!value.startsWith("dept_")) {
            list.push(workNo);
          }
        });
        close();
        resolve(list);
      },
      onCancel: async function () {
        resolve(false);
      },
    };
    open({ layout, modal, inner });
  });
  console.log("select: ", ret);
  if (!ret || !ret.length) return;
  const data = {
    workNoList: ret,
    tableName: 6,
  };
  await http.post({ url: "/ypxy/cwzn/pushImportBatch", data });
  message.success("发送通知成功");
};

const b = async function (
  e,
  { $grid },
  d,
  { dc: { open, close, http, message }, i18n: { t }, xe: { get } }
) {
  const ret = await new Promise(function (resolve) {
    const uuid = "b1b106117d5b4d1f8bd4b771cb624b4b";
    const layout = { id: uuid };
    const modal = {
      title: "选择学工工号",
      width: "35vw",
      minHeight: 200,
      defaultFullscreen: false,
      destroyOnClose: true,
      centered: true,
      open: true,
    };
    const inner = {
      onOk: async function (e, { origin }) {
        const select = get(
          origin,
          "7107b7c22dd241e6954fdb44351012fb.workNo",
          []
        );
        close();
        resolve(select);
      },
      onCancel: async function () {
        resolve(false);
      },
    };
    open({ layout, modal, inner });
  });
  console.log("select: ", ret);
  if (!ret) return;
  const data = {
    workNoList: ret.filter((i) => !i.startsWith("dept_")),
    tableName: 2,
  };
  await http.post({ url: "/ypxy/cwzn/pushImportBatch", data });
  message.success("发送通知成功");
};
